import {createContext, useContext} from "react";

const TestContest = createContext(1)
const ContextTest = ({})=>{
    const testValue = useContext(TestContest)
    return (
        <>
            <TestContest.Provider value={testValue+1}>
                <ShowTestValue/>
            </TestContest.Provider>
        </>
    )
}

const ShowTestValue = ()=>{
    const tsValue = useContext(TestContest)

    return (
        <div>
            {tsValue}
        </div>
    )
}



export default ContextTest